package com.dhcc.bpm.modules.log.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dhcc.bpm.modules.log.entity.GatewayLogDay;
import com.dhcc.bpm.modules.log.vo.*;

import java.util.List;

/**
 * @ClassName IGatewayLogDayService.class
 * @Description 网关访问记录日表 服务类
 * @Author xiaFaYu
 * @Date 2019-12-16 14:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 */
public interface IGatewayLogDayService extends IService<GatewayLogDay> {

	/**
	 * @Description 自定义分页
	 * @Author xiafayu
	 * @Date 2020/2/24 15:49
	 * @param page
	 * @param gatewayLogDay
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.dhcc.bpm.modules.log.vo.GatewayLogDayVO>
	 **/
	IPage<GatewayLogDayVO> selectGatewayLogDayPage(IPage<GatewayLogDayVO> page, GatewayLogDayVO gatewayLogDay);
	/**
	 * @Description api统计
	 * @Author xiafayu
	 * @Date 2020/2/24 15:49
	 * @param page
	 * @param apiRankVo
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.dhcc.bpm.modules.log.vo.ApiRankVo>
	 **/
	IPage<ApiRankVo> countApiNum(IPage<ApiRankVo> page, ApiRankVo apiRankVo);

	/**
	 * @Description app统计
	 * @Author xiafayu
	 * @Date 2020/2/24 15:49
	 * @param page
	 * @param apiRankVo
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.dhcc.bpm.modules.log.vo.AppRankVo>
	 **/
	IPage<AppRankVo> countAppNum(IPage<AppRankVo> page, AppRankVo apiRankVo);

	/**
	 * @Description 产品统计
	 * @Author xiafayu
	 * @Date 2020/2/24 15:49
	 * @param page
	 * @param apiRankVo
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.dhcc.bpm.modules.log.vo.ProductRankVo>
	 **/
	IPage<ProductRankVo> countProductNum(IPage<ProductRankVo> page, ProductRankVo apiRankVo);

	/**
	 * @Description 收费API统计
	 * @Author xiafayu
	 * @Date 2020/2/24 15:49
	 * @param page
	 * @param apiRankVo
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.dhcc.bpm.modules.log.vo.ApiRankVo>
	 **/
	IPage<ApiRankVo> countCostApiNum(IPage<ApiRankVo> page, ApiRankVo apiRankVo);

	/**
	 * @Description 总交易量--机构排名
	 * @Author xiafayu
	 * @Date 2020/2/24 15:48
	 * @param page
	 * @param appRankVo
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.dhcc.bpm.modules.log.vo.OrgaRankVo>
	 **/
	IPage<OrgaRankVo> countOrgaNum(IPage<OrgaRankVo> page, OrgaRankVo appRankVo);


	/**
	 * @Description 查询
	 * @Author xiafayu
	 * @Date 2020/2/24 15:48
	 * @param apiRank
	 * @return java.lang.Integer
	 **/
	Long countLastDayApiNum(ApiRankVo apiRank);

	
	/**
	 * @Description 统计TPS
	 * @Author sunhaobo
	 * @Date 2020/7/6 10:13
	 * @param apiRank
	 * @return java.lang.Long
	 **/
	Double countTps(ApiRankVo apiRank);
	
	/**
	 * @Description api统计
	 * @Author xiafayu
	 * @Date 2020/2/24 15:48
	 * @param gatewayLogDay
	 * @return java.util.List<com.dhcc.bpm.modules.log.vo.TradeTrendsVo>
	 **/
	List<TradeTrendsVo> countNumBydate(GatewayLogDayVO gatewayLogDay);

	/**
	 * @Description api统计
	 * @Author xiafayu
	 * @Date 2020/2/24 15:48
	 * @param gatewayLogDay
	 * @return java.util.List<com.dhcc.bpm.modules.log.vo.TradeTrendsVo>
	 **/
	List<TradeTrendsVo> countNumByYear(GatewayLogDayVO gatewayLogDay);


	/**
	 * @Description api统计
	 * @Author xiafayu
	 * @Date 2020/2/24 15:48
	 * @param api
	 * @return java.util.List<com.dhcc.bpm.modules.log.vo.AppApiViewVo>
	 **/
	List<AppApiViewVo> countApiData(AppApiViewVo api);

	/**
	 * @Description 产品统计通过日期分组
	 * @Author xiafayu
	 * @Date 2020/2/24 15:47
	 * @param api
	 * @return java.util.List<com.dhcc.bpm.modules.log.vo.ProductRankVo>
	 **/
	List<ProductRankVo> countProductByDate(ProductRankVo api);


	/**
	 * @Description 某一应用数据统计
	 * @Author xiafayu
	 * @Date 2020/2/24 15:47
	 * @param appApiViewVo
	 * @return com.dhcc.bpm.modules.log.vo.AppApiViewVo
	 **/
	AppApiViewVo countAppData(AppApiViewVo appApiViewVo);

	/**
	 * @Description appApiViewVo
	 * @Author xiafayu
	 * @Date 2020/2/24 15:47
	 * @param appApiViewVo
	 * @return java.util.List<com.dhcc.bpm.modules.log.vo.AppApiViewVo>
	 **/
	List<AppApiViewVo> apiChartData(AppApiViewVo appApiViewVo);

	/**
	 * @Description 某一应用通过日期分组数据统计
	 * @Author xiafayu
	 * @Date 2020/2/24 15:47
	 * @param app
	 * @return java.util.List<com.dhcc.bpm.modules.log.vo.AppApiViewVo>
	 **/
    List<AppApiViewVo> countAppDataByDate(AppApiViewVo app);

//	/**
//	 *  总交易量--应用排名
//	 * @param appRankVo
//	 * @return
//	 */
//	List<ApiRankVo> countAppNum(ApiRankVo appRankVo);



	/**
	 * @Description 日交易量 、日成功率、日成功数（首页2，3块长方块）
	 * @Author xiafayu
	 * @Date 2020/2/24 15:47
	 * @param req
	 * @return com.dhcc.bpm.modules.log.vo.TradeVolumnVo
	 **/
	TradeVolumnVo tradingVolume(TradeVolumnVo req);

	/**
	 * @Description 日期查询
	 * @Author xiafayu
	 * @Date 2020/2/24 15:47
	 * @param gatewayLogDayVO
	 * @return java.util.List<com.dhcc.bpm.modules.log.vo.TradeAppVo>
	 **/
	List<TradeAppVo> selectCountByDate(GatewayLogDayVO gatewayLogDayVO);

	/**
	 * @Description 年份统计
	 * @Author xiafayu
	 * @Date 2020/2/24 15:46
	 * @param gatewayLogDayVO
	 * @return java.util.List<com.dhcc.bpm.modules.log.vo.TradeAppVo>
	 **/
	List<TradeAppVo> selectCountByYear(GatewayLogDayVO gatewayLogDayVO);

	/**
	 * @Description 某一api 数据统计
	 * @Author xiafayu
	 * @Date 2020/2/24 15:46
	 * @param appApiViewVo
	 * @return com.dhcc.bpm.modules.log.vo.AppApiViewVo
	 **/
	AppApiViewVo apiCount(AppApiViewVo appApiViewVo);

	AppApiViewVo getCountBySysId(Long sysId);

	/**
	 * @Description 某一应用下api集合统计
	 * @Author xiafayu
	 * @Date 2020/2/24 15:46
	 * @param page
	 * @param appApiViewVo
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.dhcc.bpm.modules.log.vo.AppApiViewVo>
	 **/
    IPage<AppApiViewVo> selectAppApiNum(IPage<Object> page, AppApiViewVo appApiViewVo);

	/**
	 * @Description 某一产品下api集合统计
	 * @Author xiafayu
	 * @Date 2020/2/24 15:46
	 * @param page
	 * @param appApiViewVo
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.dhcc.bpm.modules.log.vo.AppApiViewVo>
	 **/
	IPage<AppApiViewVo> selectProApiNum(IPage<Object> page, AppApiViewVo appApiViewVo);
	/**
	 * @Description 某一产品下api集合统计
	 * @Author xiafayu
	 * @Date 2020/2/24 15:46
	 * @param page
	 * @param appApiViewVo
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.dhcc.bpm.modules.log.vo.AppApiViewVo>
	 **/
	IPage<AppApiViewVo> selectProApiNumHour(IPage<Object> page, AppApiViewVo appApiViewVo);
}
